Skip to content

Load new styles right after each deploy - #35

Closed
PrashantShuklaa wants to merge 1 commit into
mainfrom
fix/stylesheet-cache-busting
Closed

PrashantShuklaa wants to merge 1 commit into
mainfrom
fix/stylesheet-cache-busting

Conversation

@PrashantShuklaa

@PrashantShuklaa PrashantShuklaa commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Why

Right after #33 was deployed, a browser that had the old just-the-docs-default.css cached could show the new pages with the old styles. The file keeps the same address between deploys and GitHub Pages lets browsers reuse it for 10 minutes, so pages looked broken until a hard refresh.

Change

The stylesheet and theme script links now end with ?v=<build time>, so every deploy uses new addresses and browsers fetch the matching styles straight away. No visual change.

Check

  • Site check passes.
  • After merging and the Pages deploy, the home page loads with the new styles without a hard refresh.

Generated by Claude Code

The stylesheets and the theme script kept the same address between
deploys, so a browser that had the old files cached could show new
pages with old styles for a few minutes after a release. Their links
now carry the build time, so every deploy uses fresh addresses.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant